<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:80:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\loupan\detail.html";i:1493712913;s:80:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\public\layout.html";i:1493803137;s:77:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\loupan\nav.html";i:1493801722;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title><?php echo $seo['title']; ?></title>
    <meta name="Keywords" content="<?php echo $seo['keys']; ?>">
    <meta name="Description" content="<?php echo $seo['desc']; ?>">
    <link rel="stylesheet" href="__CSS__/amazeui.min.css"/>
    <link type="text/css" rel="stylesheet"  href="__CSS__/main.css"/>
    <link rel="stylesheet" href="__CSS__/mobile.css">
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script>
        var page = 1,flag  = true,params =  {page: page};
    </script>
</head>
<body>

<header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="javascript:history.back();" class="">
            <i class="am-header-icon am-icon-chevron-left"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        <?php if(isset($info)): ?><?php echo $info['title']; else: ?><?php echo $title; endif; ?>
    </h1>
    <div class="am-header-right am-header-nav">
        <a href="<?php echo url('Index/index'); ?>" class="">
            <i class="am-header-icon am-icon-home"></i>
        </a>
    </div>
</header>


<div>
    <div class="house_show_img"><?php echo $topads; ?></div>
    <div class="div_box02">
        <div class="h_s_n1 overflow_h">
            <span class="h_s_n1_img"><a href="<?php echo url('Loupan/detail',['id'=>$info['id']]); ?>"><img src="<?php echo $info['img']; ?>"></a></span>
            <dl>
                <dt>均价：<span class="org02"><?php echo $info['average_price']; ?></span>元/㎡</dt>
                <dd class="ico02"><?php echo $info['youhui']; ?></dd>
                <dd class="ico03">[<?php echo $info['city_name']; ?><?php echo $info['area_name']; ?>] <?php echo $info['address']; ?></dd>
            </dl>
        </div>

        <div class="h_s_n2 overflow_h">
            <a href="javascript:;"><span class="h_s_n2_span ico06">浏览<b><?php echo $info['hits']; ?></b></span></a>
            <a href="javascript:;"><span  data-bid="<?php echo $info['id']; ?>" class="h_s_n2_span ico07 request-url">收藏<b><?php echo $info['collection']; ?></b></span></a>
            <a href="javascript:;"><span class="h_s_n2_span ico09">问答<b><?php echo $info['ask']; ?></b></span></a>
        </div>
    </div>

    <div class="div_box03">
        <div class="tab_title01 overflow_h">
            <ul>
                <li><a href="<?php echo url('Loupan/detail',['id'=>$info['id']]); ?>" <?php if($action == "detail"): ?>class="selected"<?php endif; ?>>楼盘主页</a></li>
                <li><a href="<?php echo url('Loupan/info',['house_id'=>$info['id']]); ?>" <?php if($action == "info"): ?>class="selected"<?php endif; ?> > 详细资料</a></li>
                <li><a href="<?php echo url('Loupan/type',['house_id'=>$info['id']]); ?>" <?php if($action == "type"): ?>class="selected"<?php endif; ?> >在售户型</a></li>
                <li><a href="<?php echo url('Loupan/pic',['house_id'=>$info['id']]); ?>" <?php if($action == "pic"): ?>class="selected"<?php endif; ?>>楼盘相册</a></li>
                <li><a href="<?php echo url('Loupan/news',['house_id'=>$info['id']]); ?>" <?php if($action == "news"): ?>class="selected"<?php endif; ?>>楼盘动态</a></li>
                <li><a href="<?php echo url('Loupan/question',['house_id'=>$info['id']]); ?>" <?php if($action == "question"): ?>class="selected"<?php endif; ?>>楼盘问答</a></li>
                <li><a href="<?php echo url('Loupan/index'); ?>" >更多楼盘</a></li>
            </ul>
        </div>
        </div>
</div>
<div class="h_s_n3_t"><h1 class="h1_title"><span class="h1_title_t">楼盘动态</span></h1></div>
<div class="h_s_n3">
    <?php $obj = model("article");$obj->where("house_id=$id and status=1");$obj->field("id,title,create_time,cate_id,description");$obj->order("ordid asc,id desc");$name = $obj->limit(2)->select();if(is_array( $name ) || $name  instanceof \think\Paginator): $i = 0; $__LIST__ = $name;if( count($__LIST__)==0 ) : echo "暂无数据" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?>
    <dl>
            <dt><a title="<?php echo $data['title']; ?>" href="<?php echo url('News/detail',['id'=>$data['id']]); ?>"><?php echo $data['title']; ?></a></dt>
            <dd><em>分类∶<?php echo $articleCate['cate'][$data['cate_id']]['name']; ?></em><em>时间∶<?php echo date('Y-m-d',$data['create_time']); ?></em></dd>
            <dd><span><a href="<?php echo url('News/detail',['id'=>$data['id']]); ?>"><?php echo msubstr($data['description'],0,68); ?></a></span></dd>
        </dl>
    <?php endforeach; endif; else: echo "暂无数据" ;endif; ?>
    <p><a href="<?php echo url('Loupan/news',['house_id'=>$info['id']]); ?>" class="but02">查看该楼盘全部动态</a></p>
</div>
<?php if(!(empty($info['special_youhui']) || (($info['special_youhui'] instanceof \think\Collection || $info['special_youhui'] instanceof \think\Paginator ) && $info['special_youhui']->isEmpty()))): ?>
<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">独家优惠</span></h1>
    <div class="pageData" style="color: orange">
        <?php echo $info['special_youhui']; ?>
    </div>
</div>
<?php endif; if(!(empty($info['youdian']) || (($info['youdian'] instanceof \think\Collection || $info['youdian'] instanceof \think\Paginator ) && $info['youdian']->isEmpty()))): ?>
<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">楼盘优势</span></h1>
    <div class="pageData" style="color: orange">
        <?php echo $info['youdian']; ?>
    </div>
</div>
<?php endif; if(!(empty($info['quedian']) || (($info['quedian'] instanceof \think\Collection || $info['quedian'] instanceof \think\Paginator ) && $info['quedian']->isEmpty()))): ?>
<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">楼盘不足</span></h1>
    <div class="pageData" style="color: orange">
        <?php echo $info['quedian']; ?>
    </div>
</div>
<?php endif; ?>
<div class="div_box03">
    <div class="h_s_n3_t"><h1 class="h1_title"><span class="h1_title_t">报名看房</span></h1></div>
    <div class="pageSignUp">
        <dl>
            <dt>看房热线（24小时服务）<em>全程免费接机安排</em></dt>
            <dd><b><?php echo $site['telphone']; ?></b></dd>
        </dl>
        <form action="<?php echo url('Ajax/addOrder'); ?>" method="post" id="form">
        <ul>
            <li class="pageSignUp_ico16"><input type="text" placeholder="您的称呼" required="" class="itext" id="name" name="name"></li>
            <li class="pageSignUp_ico17"><input type="text" placeholder="您的手机号码" required="" class="itext" id="phone" name="phone"></li>
            <p><a href="javascript:;" class="but03" id="baoming_btn">提交报名</a></p>
            <input type="hidden" value="house" name="model">
            <input type="hidden" value="1" name="type" id="type">
            <input type="hidden" value="<?php echo $info['id']; ?>" name="house_id" id="house_id">
        </ul>
        </form>
    </div>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/plugins/jquery.ajax.form.js"></script>
<script>
    $(function(){
        $('#baoming_btn').on('click',function(){
            var name = $.trim($('#name').val()),phone = $('#phone').val(),reg = /^1[34578][0-9]{9}$/;
            if(name.length == 0){
                layer.msg('请填写您的姓名',{icon:2});
                return false;
            }
            if(!reg.test(phone)){
                layer.msg('请填写正确的手机号码',{icon:2});
                return false;
            }
            layer.load(1);
            $('#form').submit();
        });
    });

    $('#form').ajaxForm({success:complate,dataType:'json'});
    function complate(result){
        layer.closeAll();
        if(result.status == 1){
            layer.msg(result.msg,{icon:1});
            $('#name').val(' ');
            $('#phone').val(' ');
        } else {
            layer.msg(result.msg,{icon:2});
        }
    }
</script>

<footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
    <div class="am-footer-switch"><?php $n=0; if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['pos'] == 2): $n++; if(!(empty($vo['alias']) || (($vo['alias'] instanceof \think\Collection || $vo['alias'] instanceof \think\Paginator ) && $vo['alias']->isEmpty()))): $url=url($vo['model'].'/detail',['cate'=>$vo['alias']]); else: $url=url($vo['model'].'/index'); endif; if($n > 1): ?><span class="am-footer-divider"> | </span><?php endif; ?><a class="am-footer-desktop" href="<?php echo $url; ?>"><?php echo $vo['title']; ?></a>
        <?php endif; endforeach; endif; else: echo "" ;endif; ?>

    </div>
    <div class="am-footer-miscs ">

        <p>&copy;<?php echo date('Y'); ?>版权所有 <?php echo $site['title']; ?></p>
        <p>客服电话：<?php echo $site['telphone']; ?></p>
    </div>
    <div class="fang-footer-bar">
        <ul class="am-avg-sm-4">
            <li><a href="<?php echo url('Index/index'); ?>" <?php if($controller == "index"): ?>class="on"<?php endif; ?>><i class="am-icon-home am-icon-sm"></i><p>首页</p></a></li>
            <li><a href="<?php echo url('Loupan/index'); ?>" <?php if($controller == "loupan"): ?>class="on"<?php endif; ?>><i class="am-icon-building am-icon-sm"></i><p>新房</p></a></li>
            <li><a href="<?php echo url('Second/index'); ?>" <?php if($controller == "second"): ?>class="on"<?php endif; ?>><i class="am-icon-institution am-icon-sm"></i><p>二手</p></a></li>
            <li><a href="<?php echo url('user.index/index'); ?>"><i class="am-icon-user am-icon-sm"></i><p>我的</p></a></li>
        </ul>
    </div>
</footer>
<?php echo $site['mobileJs']; if(isset($ajaxdata)): ?>
<div id="loadingToast" class="am-hide">
    <div class="ylj-mask"></div>
    <div class="ylj-toast">
        <i class="ylj-loading weui-icon_toast"></i>
        <p class="ylj-toast__content">数据加载中</p>
    </div>
</div>
<script src="__PUBLIC__/js/layer/laytpl.js"></script>
<script>
    $(function(){
        $(window).scroll(function(){
            if(($(window).scrollTop() + $(window).height() > $(document).height()-10) && flag){
                var totalpage = $("#lists").data('total');
                if(totalpage > 1 && totalpage >= page){
                    $("#loadingToast").removeClass('am-hide');
                    getData();
                }else{
                    $("#loading-alt").removeClass('am-hide');
                    flag = false;
                }
            }
        });
    });
    function getData(){
        var url =  $("#lists").data('uri');
        $.get(url,params,function(data){
            $("#loadingToast").addClass('am-hide');
            if(data.status == 1){
                if(data.data){
                    var gettpl = document.getElementById('template').innerHTML;
                    laytpl(gettpl).render(data.data, function(html){
                        $('#lists').append(html);
                    });
                }else{
                    $('#lists').html('<li>暂无数据</li>');
                }

            }else{
                $("#loading-alt").removeClass('am-hide');
                flag = false;
            }
        });
        page++;
    }
</script>
<?php endif; ?>
</body>
</html>